1. Field of the Invention
The present invention generally relates to performing calculations in a processor.
2. Description of the Related Art
Modern computer systems are typically capable of executing a wide variety of programs which perform various calculations at high speed. For example, a computer system may be configured to execute a video game in which a series of three-dimensional images (frames) is rapidly generated in a process referred to as rendering. The frames may then be displayed one after the other in quick succession, thereby producing an impression of motion. The video game may also be configured to perform physics simulations to simulate the result of actions being performed by a player of the video game.
One of the types of calculations performed during rendering may include a trigonometric calculation. For example, trigonometric calculations may be performed during shading operations to determine an angle at which light from a light source reflects off of a surface. Trigonometric calculations may also be performed where the video game performs physics simulations such as simulations of physical collisions between two objects. Such trigonometric calculations may also be performed by other programs in addition to video games, such as rendering or graphics programs.
Typically, in order to improve the quality of programs which perform high speed rendering and physics simulations, there may be a desire to improve the speed at which trigonometric calculations are performed. By increasing the speed at which the trigonometric calculations are performed, a program rendering three-dimensional scenes may provide increased detail with respect to a program which is limited to performing slower trigonometric calculations. Similarly, a program which is able to perform trigonometric calculations more quickly may perform more numerous physics simulations of greater accuracy than a program which is limited to performing slower trigonometric calculations.
Accordingly, what is needed are an improved method, computer-readable medium, and apparatus for generating trigonometric results of a trigonometric calculation.